package com.yh.demo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by yanghao on 2017/10/23.
 */
@RestController
public class HelloController {

    @Autowired
    private HelloService helloService;

    private Logger logger = LoggerFactory.getLogger(HelloController.class);
    @RequestMapping("/hi")
    public String hi(@RequestParam(value = "name") String name){
        logger.info("Ribbon Invoked...");
        return helloService.hiService(name);
    }
}
